home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
hardlock.arc
/
HARDUNL.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-09-20
|
851b
|
27 lines
include macros.asm
Begincom hardunl
jmp start
msg0 db 'hardunlock Completed Sucessfully',10,13,'$'
msg1 db 'hardunlock Disk I/O error.',10,13,'$'
buffer db 512 dup(?)
start proc near
mov ax,0201h ;read one sector
lea bx,buffer ;set up read address
mov cx,1 ;read the partition table
mov dx,0080h ;On drive C
int 13H ;execute read
jc IO_FAIL ;if carry - issue message
mov byte ptr [bx+511],0AAh ;repair clobbered partition table
mov ax,0301h ;set up write command
int 13H
lea dx,msg0 ;point to OK message
jnc SENDMSG ;display msg
IO_FAIL: lea dx,msg1 ;point to failure message
SENDMSG: mov ah,9 ;dos display string
int 21h ;send message
int 20h ;terminate program
start endp
endcom hardunl